package io_exercise;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo1 {
    public static void main(String[] args) throws IOException {
        String name1="zs";
        int age1=25;
        String gender1="男";
        String[] otherInfo1={"是一名学生","家住佳木斯","喜欢打篮球"};
        Student1 zs=new Student1(name1,age1,gender1,otherInfo1);
        System.out.println(zs);

        FileOutputStream fos1=new FileOutputStream("student1.obj");
        ObjectOutputStream oos1=new ObjectOutputStream(fos1);
        oos1.writeObject(zs);
        System.out.println("写出完毕!");
        oos1.close();

    }
}
